classdef OCCLUDER_SIMPLE < OCCLUDER
   
    methods
        function self = OCCLUDER_SIMPLE(exp,size,position)
            % simplifiedOccluder(exp,size,position)
            %
            % SIZE      an array with all the possible sizes of the occluders in
            %           pixels
            % POSITION  An array with all the positions in pixes assuming
            %           that the center of the screen is equal to 0.
            
            self = self@OCCLUDER(exp);
            self.W = ones(exp.num_blocks,exp.num_trials);
            self.X = ones(exp.num_blocks,exp.num_trials);
            for i = 1:exp.num_blocks
               tmp = exp.trialtypes(i,:);
               for j = 1:numel(exp.FpClearn)
                   self.X(i,tmp == j) = position(randperm(numel(position)));
               end
            end
            % Puts the X in contralateral position.
            self.X = self.X .* sign(exp.randomFixation);
            rsize = ceil(rand(1,exp.num_blocks*exp.num_trials)*numel(size));
            self.W(:) = size(rsize);
        end
        
    end
    
end